package com.whfc.fvs.service.runner;

import com.whfc.fvs.service.UniEventSubscriptionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 宇视事件订阅启动执行器
 */
@Slf4j
@Component
@Order(1)
public class UniEventSubscriptionRunner implements CommandLineRunner {

    @Autowired
    private UniEventSubscriptionService uniEventSubscriptionService;

    @Override
    public void run(String... args) throws Exception {
        log.info("开始执行宇视事件订阅...");
        uniEventSubscriptionService.subscribeEvents();
        log.info("宇视事件订阅执行完成");
    }
}